package com.trip.file.controller;


import com.trip.common.vo.Result;
import com.trip.file.service.MinIOService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/minio")
public class MinIOController {
    @Autowired
    private MinIOService minIOService;
    @PostMapping("/upload")
    public Result upload(MultipartFile file)  {
        return minIOService.uploadImage(file);
    }

}
